//
//  HZ_Shuffling_CollectionReusableView.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/3/31.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZ_Shuffling_CollectionReusableView.h"
#import "DCPicScrollView.h"
#import "HS_DataArray_Model.h"
@interface HZ_Shuffling_CollectionReusableView ()


@property (nonatomic, strong) UIView *view;
@end
@implementation HZ_Shuffling_CollectionReusableView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {

        self.backgroundColor = [UIColor clearColor];
        
    }
    return self;
}


-(void)setArray:(NSMutableArray *)array{

    _array = array;
 
    if (_array.count > 0) {
        
    
    self.view = [[UIView alloc] initWithFrame:self.bounds];
    
    self.view.backgroundColor = [UIColor clearColor];
    _scroll = [DCPicScrollView picScrollViewWithFrame:self.view.frame WithImageUrls:self.array];
//    _scroll.backgroundColor = [UIColor whiteColor];
        _scroll.imageViewDidTapAtIndex = ^void(NSInteger i){


            NSNotificationCenter *toushitu = [NSNotificationCenter defaultCenter];

            [toushitu postNotificationName:@"5" object:_urlarray[i] userInfo:nil];
        
        };
        
        
        
    [self.view addSubview:_scroll];
    
    [self addSubview:self.view];
        
        }
}

-(void)setUrlarray:(NSMutableArray *)urlarray{
    
    _urlarray = urlarray;
    
   
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
